package com.itlong.cloud.iottp;

import com.itlong.cloud.POJO.DTO.app.AppPadBotRobotDTO;
import com.itlong.cloud.POJO.DTO.property.PropertyPadBotDeliveryTaskDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <desc>
 *      派宝机器人接口暴露层
 * </desc>
 *
 * @createDate2021/1/6
 **/
@FeignClient(name = "iot-tp-service")
public interface IPadBotRobotServiceClient {

//    /**
//     * <desc>
//     *      获取目标点列表
//     * </desc>
//     *
//     * @param appPadBotRobotDTO 调用派宝接口参数DTO
//     * @return 目标点信息列表
//     * @Author Zhu.yj
//     * @createDate  2021/1/6
//     */
//    @PostMapping("/app/server/getTargetPointList")
//    List<AppPadBotTargetPointVO> getTargetPointList(@RequestBody AppPadBotRobotDTO appPadBotRobotDTO) throws Exception;

    /**
     * <desc>
     *      取消派送任务
     * </desc>
     *
     * @param appPadBotRobotDTO 调用派宝接口参数DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2021/1/6
     */
    @PostMapping("/app/server/cancelDeliveryTask")
    boolean cancelDeliveryTask(@RequestBody AppPadBotRobotDTO appPadBotRobotDTO) throws Exception;

    /**
     * <desc>
     *      新建派送任务
     * </desc>
     *
     * @param appPadBotRobotDTO 调用派宝接口参数DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2021/1/6
     */
    @PostMapping("/app/server/createDeliveryTask")
    String createDeliveryTask(@RequestBody AppPadBotRobotDTO appPadBotRobotDTO) throws Exception;

    /**
     * <desc>
     *      更新派宝机器人地图信息
     * </desc>
     *
     * @param  serialNumber 机器人序列号
     * @return
     * @Author Zhu.yj
     * @createDate  2021/1/8
     */
    @PostMapping("/app/server/saveMapTargetInfo")
    Integer saveMapTargetInfo(@RequestParam("serialNumber") String serialNumber) throws Exception;

    /**
     * <desc>
     *      配置回调地址
     * </desc>
     *
     * @param
     * @return
     * @Author Zhu.yj
     * @createDate  2021/1/12
     */
    @PostMapping("/property/padbot/deliveryTask/configCallbackUrl")
    boolean configCallbackUrl(@RequestBody PropertyPadBotDeliveryTaskDTO deliveryTaskDTO) throws Exception;

    /**
     * <desc>
     *      查询回调地址
     * </desc>
     *
     * @param deliveryTaskDTO
     * @return
     * @Author Zhu.yj
     * @createDate  2021/1/12
     */
    @PostMapping("/property/padbot/deliveryTask/getCallbackUrl")
    String getCallbackUrl(@RequestBody PropertyPadBotDeliveryTaskDTO deliveryTaskDTO) throws Exception;

}
